﻿const mongoose = require("mongoose")
// mac下只能用127.0.0.1，win下可以用localhost
mongoose.connect('mongodb://127.0.0.1:27017/finance',{
    useUnifiedTopology: true,
    useNewUrlParser: true,
    useCreateIndex:true
})
mongoose.set('useFindAndModify', false)
module.exports = mongoose   // 导出mongoose